package main

import (
	"fmt"
	"math/rand"
)

func main() {
	var  arr [10]int
	for i := 0; i<10; i++{
		arr[i] =  rand.Intn(100)
	}

	sum :=  0
	max :=  0
	maxIndex := 0
	for i := len(arr) -1; i >= 0; i--{
		fmt.Printf("%v ", arr[i])
		sum += arr[i]
		if arr[i] > max{
			max = arr[i]
			maxIndex = i
		}
	}
	fmt.Println()
	fmt.Println(float64(sum) / 10)
	fmt.Println(max)
	fmt.Println(maxIndex)
}